package com.foreknow.elmboot.mapper;


import com.foreknow.elmboot.po.Orders;
import org.apache.catalina.servlets.DefaultServlet;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OrdersMapper {

    public int createOrders(Orders orders);

    public Orders getOrdersById(Integer orderId);

    public List<Orders> listOrdersByUserId(String userId);

    @Update("update orders set orderState = 1 where orderId =#{orderId}")
    public int updateOrderByOrderId (Integer orderId);

}
